﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace CoreLims.Models.CoreLims
{
    public partial class Eq
    {
        public class EquipmentTypeCompare : IEqualityComparer<EqEquipment>
        {
            bool IEqualityComparer<EqEquipment>.Equals(EqEquipment x, EqEquipment y)
            {
                return x.Type == y.Type;
            }

            int IEqualityComparer<EqEquipment>.GetHashCode(EqEquipment obj)
            {
                if (string.IsNullOrEmpty(obj.Type))
                { return 0; }
                else
                { return obj.Type.Length; }
            }
        }

    }
}
